{template "content","header"}
<link href="{CSS_PATH}table_form.css" rel="stylesheet" type="text/css" />
<!--main-->
<div class="main_tab">
	{template "content","left"}
	<div class="tab">
		<div class="contact_left">
			<div class="contact_left_title1"><span>联系我们</span></div>
			<div class="contact_left_content">{pc:block pos="page_contact" siteid="$siteid"}{/pc}</div>
			<div class="contact_left_title"><span>公司证件</span></div>
			<div class="contact_left_content">{pc:block pos="page_zj" siteid="$siteid"}{/pc}</div>
			{pc:block pos="page_gg" siteid="$siteid"}{/pc}
		</div>
		<div class="contact_right">
			{template "content","nav"}
			<div class="pagenav">{$dangqian}{$name}</div>
		    <div class="contact_right_content">
				<div class="contact_right_content_title">{$name}</div>
				<div class="content">
				<form method="post" action="/index.php?m=formguide&c=index&a=show&formid={$formid}&siteid=<?php echo $this->siteid;?>" name="myform" id="myform" onsubmit="return docredit();">
<table class="table_form" width="100%" cellspacing="0">
<tbody>
 {loop $forminfos_data $field $info}
	{if $info['formtype']=='omnipotent'}
		{loop $forminfos_data $_fm $_fm_value}
			{if $_fm_value['iscomnipotent']}
				{php $info['form'] = str_replace('{'.$_fm.'}',$_fm_value['form'],$info['form']);}
			{/if}
		{/loop}
	{/if}
	<tr>
      <th width="120" style="font-size:14px; font-weight:bold;"><font color="red">*</font>{if $info['star']}{/if}{$info['name']}:</th>
      <td>{$info['form']}  {$info['tips']}</td>
    </tr>
{/loop}
	</tbody>
</table>
<div style="margin-left:20%; margin-top:15px; margin-bottom:15px;"><input type="submit" name="dosubmit" id="dosubmit" value="提交申请" class="submit"></div>
</form>
			</div>
			</div>
		</div>
		<div class="clear"></div>
	</div>
</div>
{template "content","footer"}
<script>
$().ready(function(){
	$('input.input-text{$formid}').focus(function(){
		if($(this).val()==$(this).attr('intro')){
		$(this).val('');
		}
		$(this).removeClass('intro_default');
	}).blur(function(){
		if($(this).val()==''){
			$(this).val($(this).attr('intro'));
			$(this).addClass('intro_default');
		}	
	});
	
	$('input.input-text{$formid}[value=]').each(function(){
		$(this).val($(this).attr('intro')).addClass('intro_default');
	});
});
		function clearInputIntro(){
			$("input.input-text{$formid}").each(function(){
				if($(this).val() == $(this).attr("intro")){
					$(this).val("");
				}
			});
		}
		
		function ResetInputIntro(){
			$("input.input-text{$formid}").each(function(){
				if($(this).val() == ""){
					$(this).val($(this).attr("intro"));
				}
			});
		}
		function docredit()
		{
			clearInputIntro();
		 {loop $forminfos_data $field $info}
		 <?
		 	$num = ($field=='ygl') ? 0 : 1;
		 ?>
			if($("#{$field}").val()=="" || $("#{$field}").val()<{$num})
			{
				alert("请输入{$info['name']}");
				ResetInputIntro();
				$("#{$field}").focus();
				return false;
			}
		 {/loop}	
		}
</script>